﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT011 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagDefinition U000E;

    [Description("Input Time")]
    public MT011.Tag175 InputTime_175
    {
      get
      {
        return new MT011.Tag175((SwiftElement) this, 0, (SwiftDefinitionElement) MT011.U0002);
      }
    }

    [Description("Input Time")]
    public MT011.Tag175 Tag175_InputTime
    {
      get
      {
        return this.InputTime_175;
      }
    }

    [Description("Message Input Reference")]
    public Tag106 MessageInputReference_106
    {
      get
      {
        return new Tag106((SwiftElement) this, 0, (SwiftDefinitionElement) MT011.U0004);
      }
    }

    [Description("Message Input Reference")]
    public Tag106 Tag106_MessageInputReference
    {
      get
      {
        return this.MessageInputReference_106;
      }
    }

    [Description("Message User Reference")]
    public Tag108 MessageUserReference_108
    {
      get
      {
        return new Tag108((SwiftElement) this, 0, (SwiftDefinitionElement) MT011.U0005);
      }
    }

    [Description("Message User Reference")]
    public Tag108 Tag108_MessageUserReference
    {
      get
      {
        return this.MessageUserReference_108;
      }
    }

    [Description("Output Time")]
    public MT011.Tag175 OutputTime_175
    {
      get
      {
        return new MT011.Tag175((SwiftElement) this, 0, (SwiftDefinitionElement) MT011.U0007);
      }
    }

    [Description("Output Time")]
    public MT011.Tag175 Tag175_OutputTime
    {
      get
      {
        return this.OutputTime_175;
      }
    }

    [Description("Message Output Reference")]
    public Tag107 MessageOutputReference_107
    {
      get
      {
        return new Tag107((SwiftElement) this, 0, (SwiftDefinitionElement) MT011.U000E);
      }
    }

    [Description("Message Output Reference")]
    public Tag107 Tag107_MessageOutputReference
    {
      get
      {
        return this.MessageOutputReference_107;
      }
    }

    public MT011()
      : base(true)
    {
    }

    public MT011(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT011.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT011.MessageDefinition = new SwiftMessageDefinition("MT011", "Delivery Notification");
      MT011.U0002 = new SwiftTagDefinition("InputTime_175", "Input Time");
      MT011.U0002.TagName = "{175:";
      MT011.U0003 = new SwiftTagSubItemDefinition("InputTime", "Input Time");
      MT011.U0002.Elements.Add((SwiftDefinitionElement) MT011.U0003);
      MT011.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT011.U0002);
      MT011.U0004 = new SwiftTagDefinition("MessageInputReference_106", "Message Input Reference");
      MT011.U0004.TagName = "{106:";
      MT011.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT011.U0004);
      MT011.U0005 = new SwiftTagDefinition("MessageUserReference_108", "Message User Reference");
      MT011.U0005.TagName = "{108:";
      MT011.U0005.Mandatory = false;
      MT011.U0006 = new SwiftTagSubItemDefinition("MessageUserReference", "Message User Reference");
      MT011.U0005.Elements.Add((SwiftDefinitionElement) MT011.U0006);
      MT011.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT011.U0005);
      MT011.U0007 = new SwiftTagDefinition("OutputTime_175", "Output Time");
      MT011.U0007.TagName = "{175:";
      MT011.U0008 = new SwiftTagSubItemDefinition("OutputTime", "Output Time");
      MT011.U0007.Elements.Add((SwiftDefinitionElement) MT011.U0008);
      MT011.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT011.U0007);
      MT011.U000E = new SwiftTagDefinition("MessageOutputReference_107", "Message Output Reference");
      MT011.U000E.TagName = "{107:";
      MT011.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT011.U000E);
    }

    public class Tag175 : SwiftTagWrapper
    {
      public string Value
      {
        get
        {
          return this.GetValue();
        }
        set
        {
          this.SetValue("175", value);
        }
      }

      internal Tag175(SwiftElement parent, int index, SwiftDefinitionElement definition)
        : base(parent, index, definition)
      {
      }
    }
  }
}
